<?php
use yii\widgets\LinkPager;
use common\helpers\Url;
use common\helpers\Html;
use yii\bootstrap\Alert;
$this->title = '投诉建议';
$this->params['breadcrumbs'][] = ['label' => $this->title];
?>
<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title"><?= $this->title; ?></h3>
            </div>
            <div class="box-body table-responsive">
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th>#</th>
                        <th>用户名</th>
                        <th>标题</th>
                        <th>内容</th>
                        <th>联系方式</th>
                        <th>状态</th>
                        <th>创建时间</th>
						<th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach($models as $key=>$model){ ?>
                        <tr id = <?= $model->id; ?>>
                            <td><?= $key + 1; ?></td>
                            <td><?= $model->type->nickname; ?></td>
                            <td><?= $model->title; ?></td>
                            <td><?= $model->content; ?></td>
                            <td><?= $model->mobile; ?></td>
                            <td><?= $model->status; ?></td>
                            <td><?= date('Y-m-d H:i:s',$model->created_at); ?></td>
							<td>
							<?= Html::read(['read', 'id' => $model['id']]) ?>
							<?= Html::delete(['cancel', 'id' => $model['id']]) ?>
							</td>						
                        </tr>
                    <?php } ?>
                    </tbody>
                </table>
            </div>
            <div class="box-footer">
                <?= LinkPager::widget([
                    'pagination' => $pages,
					'hideOnSinglePage' => false,
					'nextPageLabel' => '下一页', 
					'prevPageLabel' => '上一页', 
                ]);?>
            </div>
        </div>
    </div>
</div>